<template>
  <div class="login">
    <transition name="componentTab">
      <LoginDetail
        v-if="isShowLoginDetail"
        @changeShowState="changeShowState"
      />
    </transition>
    <header class="header-top">
      <van-icon name="arrow-left" @click="$router.go(-1)" />
    </header>
    <header class="header">
      <div>猫乐美食</div>
      <div>会做饭很酷</div>
    </header>
    <div class="btn" @click="changeShowState">手机号登录</div>
    <div class="footer">
      <div>其他登录方式</div>
      <div class="ways">
        <div class="img-box">
          <img src="@/../public/images/login/1676031082402.png" alt="" />
        </div>
        <div class="img-box">
          <img src="@/../public/images/login/1676031082403.png" alt="" />
        </div>
        <div class="img-box">
          <img src="@/../public/images/login/1676031082405.png" alt="" />
        </div>
      </div>
      <div class="agreement">
        <input type="checkbox" />登录即表示同意<span>《用户协议》</span>和<span
          >《隐私协议》</span
        >
      </div>
    </div>
  </div>
</template>

<script>
import LoginDetail from "@/components/LoginDetail.vue";
export default {
  components: {
    LoginDetail,
  },
  data: () => {
    return {
      isShowLoginDetail: false,
    };
  },
  methods: {
    changeShowState() {
      this.isShowLoginDetail = !this.isShowLoginDetail;
    },
  },
};
</script>

<style lang="scss" scoped>
.login {
  width: 100%;
  .header-top {
    width: 100%;
    height: 0.5rem;
    font-size: 0.2rem;
    line-height: 0.5rem;
    box-sizing: border-box;
    padding: 0 0.1rem;
  }
  .header {
    font-size: 0.3rem;
    color: var(--text-black);
    font-weight: bold;
    line-height: 0.3rem;
    margin-top: 0.5rem;
    box-sizing: border-box;
    padding: 0 0.2rem;
    > div {
      margin: 0.1rem;
    }
  }
  .btn {
    width: 3.2rem;
    height: 0.54rem;
    border-radius: 0.27rem;
    background-color: var(--bgc-yellow);
    font-size: 0.2rem;
    line-height: 0.54rem;
    text-align: center;
    color: var(--text-black);
    margin: 2rem auto 0 auto;
  }
  .footer {
    width: 100%;
    box-sizing: border-box;
    padding: 0 0.25rem;
    margin-top: 0.8rem;
    font-size: 0.13rem;
    color: var(--text-gray2);
    .ways {
      display: flex;
      margin: 0.24rem 0.05rem;
      .img-box {
        width: 0.32rem;
        height: 0.32rem;
        border-radius: 50%;
        margin-right: 0.27rem;
      }
    }
    .agreement {
      display: flex;
      align-items: center;
      > input {
        margin-right: 0.1rem;
        margin-top: 0.01rem;
      }
      > span {
        color: var(--text-green);
      }
    }
  }
}
</style>